class bgScene extends ui.bgUI {
    mainDlg: map;
    constructor() {
        super();
        Laya.stage.addChild(this);
        this.btnStart.on(Laya.Event.CLICK, this, this.onGameStart);
        this.btnRank.on(Laya.Event.CLICK, this, this.onRank);
    }

    onGameStart() {
        if (this.mainDlg) {
            this.mainDlg.removeSelf();
            this.mainDlg.destroy();
        }
        this.mainDlg = new map();
        console.log("游戏开始");
        this.removeSelf();
        this.destroy();

    };
    onRank() {
        console.log("查看排行榜");
    }
}